<%--
  Created by IntelliJ IDEA.
  User: taohj
  Date: 2014/6/29
  Time: 18:04
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %>
<%
    String path = request.getContextPath();
    String basePath = request.getScheme() + "://"
            + request.getServerName() + ":" + request.getServerPort()
            + path + "/";
%>
<c:set var="dashboardMenuTag" value="myorg" scope="request"></c:set>
<c:set var="menu" value="none" scope="request"></c:set>

<!Doctype html>
<html>
<head>
    <base href="<%=basePath%>">
    <title>政府数据开放平台</title>
    <jsp:include page="../../../commons/include.jsp"/>

    <link href="/resources/css/lib.css" rel="stylesheet">


    <script>
        $(function () {

            var id = $("input[type=hidden][name=id]").val();


            $(".table tbody tr").each(function () {

                var role = $(this).attr("role");

                $(this).find(":last-child :first-child").on('click', function () {
                    location.href = '/front/my/org/member/modify?role=' + role + '&id=' + id;
                });


            });
        });
    </script>


</head>
<body>


<jsp:include page="../../../commons/top.jsp"/>

<div class="main" style="min-height: 600px">
    <jsp:include page="../../../commons/dashboardMenu.jsp"/>


    <div>
        <div class="left">
            <c:set var="leftMenu" value="role" scope="request"></c:set>
            <jsp:include page="../commons/leftMenu.jsp"/>
        </div>


        <div class="right">
            <input type="hidden" name="id" value="${requestScope.member.id}">

            <div style="padding: 30px;">
                <div style="min-height: 460px">
                    <table class="table" width="100%" org="${requestScope.org}">
                        <thead>
                        <tr>
                            <td width="50">序号</td>
                            <td>名称</td>
                            <td>机构</td>
                            <td>简介</td>
                            <td>操作</td>
                        </tr>
                        </thead>

                        <tbody>
                        <c:forEach items="${requestScope.roles}" var="role" varStatus="status">
                            <tr role="${role.id}">
                                <td>${(requestScope.result.pageResult.page-1)*requestScope.result.pageResult.size+status.count}</td>
                                <td>${role.name}</td>
                                <td>${role.org.name}</td>
                                <td>${role.description}</td>
                                <td style="text-align: left">
                                    <ul id="icons" class="ui-widget ui-helper-clearfix">
                                        <li class="ui-state-default ui-corner-all" title="确定"><span
                                                class="ui-icon ui-icon-check"></span></li>
                                    </ul>
                                </td>
                            </tr>

                        </c:forEach>
                        </tbody>
                    </table>

                </div>


            </div>


            <%-- <div>
                 <ul class="pagination" style="margin: 20px 30px;">
                     <li page="${requestScope.result.pageResult.startPage-1}">
                         &laquo;
                     </li>

                     <c:forEach begin="${requestScope.result.pageResult.startPage}"
                                end="${requestScope.result.pageResult.endPage}" var="index">
                         <li page="${index}" <c:if
                                 test="${index==requestScope.result.pageResult.page}"> class="active" </c:if>>${index}
                         </li>
                     </c:forEach>

                     <li page="${requestScope.result.pageResult.endPage+1}">
                         &raquo;
                     </li>
                 </ul>
             </div>--%>

        </div>

    </div>

</div>


<jsp:include page="../../../commons/buttom.jsp"/>
</body>
</html>
